package com.jzy.gulimall.member.config;

import com.jzy.gulimall.member.interceptor.UserLoginInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * @author jzy
 * @date 2020/9/20 15:42
 */
@Configuration
public class MemberWebConfig implements WebMvcConfigurer {

    @Resource
    private UserLoginInterceptor userLoginInterceptor;

    //排除登录注册
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(userLoginInterceptor).excludePathPatterns("/member/member/oauth/login","/member/member/login","/member/member/register","/member/memberreceiveaddress/info/**");
    }
}
